package com.aos.exception;

/**
 *
 * @ClassName:  BusinessExceptionVo
 * @Description:	异常封装类
 *
 */
public class BusinessException extends RuntimeException{
    /**
     * @Fields serialVersionUID
     */
    private static final long serialVersionUID = 4069423741846731410L;
    /**
     * 错误信息
     */
    private String errorMessage = "";
    /**
     * 错误编码
     */
    private String errorCode = "";
    /**
     * 返回数据
     */
    private Object data = "";

    /**
     * @Title:  BusinessExceptionVo
     * @Description: 构造器
     * @param:  @param errorMessage
     * @param:  @param errorCode
     * @param:  @param data
     * @throws
     */
    public BusinessException(String errorMessage, String errorCode, Object data) {
        super(errorMessage);
        this.errorMessage = errorMessage;
        this.errorCode = errorCode;
        this.data = data;
    }

    /**
     * @Title:  BusinessExceptionVo
     * @Description: 构造器
     * @param:  @param errorMessage
     * @param:  @param errorCode
     * @throws
     */
    public BusinessException(String errorMessage, String errorCode) {
        super(errorMessage);
        this.errorMessage = errorMessage;
        this.errorCode = errorCode;
    }

    /**
     * @Title:  BusinessExceptionVo
     * @Description: 构造器
     * @param:  @param errorCode
     * @throws
     */
    public BusinessException(String errorCode) {
        super();
        this.errorCode = errorCode;
    }

    public String getErrorMessage() {
        return errorMessage;
    }
    public String getErrorCode() {
        return errorCode;
    }
    public Object getData() {
        return data;
    }
}
